home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / DISK / VORCMP11.ARJ / VORCOMP.DOC < prev    next >
Text File  |  1991-02-01  |  36KB  |  1,122 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                VORCOMP (tm)   Program Documentation
  8.  
  9.  
  10.                   Version 1.1
  11.  
  12.                   Copyright (C) 1989, 1991 by
  13.  
  14.                      Voree Software
  15.                      5894 Spring Valley Rd.
  16.                      Burlington, WI  53105
  17.  
  18.                   All Rights Reserved
  19.  
  20.                      Phone:  (414) 763-4522
  21.                      8 a.m. - 8 p.m.  Central Time
  22.  
  23.                   February 1, 1991
  24.  
  25.  
  26.                A DIRECTORY AND FILE GROUP COMPARE UTILITY
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                               - 1 -
  61.                          TABLE OF CONTENTS
  62.  
  63.  
  64. PURPOSE,  DISCLAIMER   . . . . . . . . . . . . . . . . . . . .  3
  65.  
  66. QUICK START
  67.    Getting Information . . . . . . . . . . . . . . . . . . . .  3
  68.    Comparing Two Files . . . . . . . . . . . . . . . . . . . .  4
  69.    Comparing Two Groups  . . . . . . . . . . . . . . . . . . .  4
  70.    Redirecting Output to a File  . . . . . . . . . . . . . . .  4
  71.  
  72. LIMITATIONS  . . . . . . . . . . . . . . . . . . . . . . . . .  5
  73.  
  74. TYPES OF COMPARE . . . . . . . . . . . . . . . . . . . . . . .  5
  75.    A File and a File . . . . . . . . . . . . . . . . . . . . .  6
  76.    A File and a Directory  . . . . . . . . . . . . . . . . . .  6
  77.    A Group and a Group . . . . . . . . . . . . . . . . . . . .  6
  78.  
  79. DISPLAY FORMAT . . . . . . . . . . . . . . . . . . . . . . . .  7
  80.  
  81. USE OF OPTIONS . . . . . . . . . . . . . . . . . . . . . . . .  9
  82.  
  83. GENERAL-PURPOSE OPTIONS  . . . . . . . . . . . . . . . . . . . 10
  84.  
  85. DISPLAY OPTIONS  . . . . . . . . . . . . . . . . . . . . . . . 11
  86.  
  87. PAUSE OPTIONS  . . . . . . . . . . . . . . . . . . . . . . . . 12
  88.  
  89. ERROR CODES
  90.    Specifying Error Options  . . . . . . . . . . . . . . . . . 13
  91.    Reporting Error Options . . . . . . . . . . . . . . . . . . 14
  92.  
  93. ERROR REPORTING
  94.    Error Messages  . . . . . . . . . . . . . . . . . . . . . . 15
  95.    Press and Key to Continue . . . . . . . . . . . . . . . . . 15
  96.    ErrorLevel  . . . . . . . . . . . . . . . . . . . . . . . . 15
  97.  
  98. BATCH FILE SUGGESTIONS
  99.    Copy All Files  . . . . . . . . . . . . . . . . . . . . . . 17
  100.    Copy Selected Files . . . . . . . . . . . . . . . . . . . . 17
  101.    General-Purpose Copy Command  . . . . . . . . . . . . . . . 18
  102.    Tested Archive  . . . . . . . . . . . . . . . . . . . . . . 18
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.                               - 2 -
  120. PURPOSE
  121.  
  122.  
  123.      This file compare program, called VorComp, was written by
  124. James D. Hajicek. It performs the function of comparing two files
  125. for any differences, or of comparing two complete directories for
  126. differences in contents or differences in the common files.
  127.  
  128.      Groups of files may also be designated for comparison by
  129. the use of wild cards. Complete subdirectory trees may be also
  130. compared. Hidden files, volume labels, and directory attributes
  131. may be included in the comparisons. Many options are available to
  132. control the type of comparisons performed, the display, and the
  133. generated ErrorLevel.
  134.  
  135.      VorComp runs on an IBM PC or compatible computer using
  136. PC-DOS or MS-DOS version 2.0 or greater.
  137.  
  138.  
  139.  
  140.  
  141. DISCLAIMER
  142.  
  143.  
  144.      This program has been carefully written and tested. However,
  145. the user of the program is solely responsible for determining if
  146. it is useful and adequate for the intended purpose.
  147.  
  148.      No warranty is expressed or implied.
  149.  
  150.  
  151.  
  152.  
  153. QUICK START
  154.  
  155.  
  156.      The following information is provided only to permit a quick
  157. introduction to the use of the program. For many additional
  158. features, refer to the later sections of this manual.
  159.  
  160.  
  161.  
  162. *** GETTING INFORMATION ***
  163.  
  164.      Information about the compare program may be obtained from
  165. the DOS prompt by using the following command:
  166.  
  167.    VORCOMP
  168.  
  169. with no other parameters. This information includes a short
  170. description of the various options which may also be used with
  171. this program.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                               - 3 -
  179. *** COMPARING TWO FILES ***
  180.  
  181.      In normal use, two files are compared from the DOS prompt
  182. with the following command:
  183.  
  184.    VORCOMP file1 file2
  185.  
  186. If desired, the filenames may include a path to the files.
  187.  
  188.      A file may be compared to another file with the same name in
  189. another directory from the DOS prompt with the following command:
  190.  
  191.    VORCOMP file path
  192.  
  193.  
  194.  
  195. *** COMPARING TWO GROUPS ***
  196.  
  197.      Two complete directories are compared from the DOS prompt
  198. with the following command:
  199.  
  200.    VORCOMP path1 path2
  201.  
  202. The path may include a drive specification, if desired, or may
  203. be only a drive specification.
  204.  
  205.      Any two groups of files may be compared by specifying the two
  206. groups:
  207.  
  208.    VORCOMP group1 group2
  209.  
  210. where a group may be either an entire directory or a file description
  211. with ? and * wildcards.
  212.  
  213.  
  214.  
  215. *** REDIRECTING OUTPUT TO A FILE ***
  216.  
  217.      As with many utility programs, the screen display output may
  218. be redirected to a disk file to make a more permanent record of
  219. the comparisons:
  220.  
  221.    VORCOMP path1 path2 > filename
  222.  
  223.    VORCOMP path1 path2 >> filename
  224.  
  225. The second variation above appends to the "filename" file, while
  226. the first overwrites it.
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.                               - 4 -
  238. LIMITATIONS
  239.  
  240.  
  241.      When there are not too many files in the two groups which
  242. are being compared, VorComp 1.1 is capable of running in less
  243. than 25 K bytes of available memory (RAM).
  244.  
  245.      With more available memory, VorComp will allocate additional
  246. memory for its data buffers: up to 64 K bytes for the directory
  247. buffer, up to 64 K bytes for each of two data compare buffers,
  248. and an indeterminate amount of memory for the directory tree when
  249. the /S subdirectory option is used.
  250.  
  251.      With sufficient available memory, the 64 K byte size of the
  252. directory buffer allows for over 2,900 files total in the two
  253. groups being compared. When the /S subdirectory option is used,
  254. the 2,900 file limit applies to each of the directories compared,
  255. but the grand totals may be larger than this.
  256.  
  257.      Double precision (32 bit) arithmetic has been used for grand
  258. total file counts. This allows for large numbers of files on
  259. extremely large disks. In a few places the display format does
  260. not appear to provide room for such large numbers, but in such an
  261. unusual case the numbers will be correct, even if crowding pushes
  262. them out of their normal position on the screen.
  263.  
  264.      The maximum length for a pathname is 79 characters. This
  265. should provide sufficient room for a drive specification, the
  266. longest usable path which DOS allows, and a twelve character
  267. filename. The display of long pathnames will shift around, when
  268. necessary, to make room for them in the display format.
  269.  
  270.      Subdirectory searches, using the /S option, are limited in
  271. depth to 32 levels. This should be sufficient for the longest
  272. usable path which DOS allows.
  273.  
  274.      Any problems with the above restrictions, such as
  275. insufficient memory, too many files, overly long pathnames, or
  276. subdirectory tree depth, will be reported as a "SYSTEM ERROR" and
  277. the program will be halted. Batch files may detect such a system
  278. error by checking for an ErrorLevel of 100. For more information,
  279. see the "Error Reporting" section below.
  280.  
  281.  
  282.  
  283.  
  284. TYPES OF COMPARE
  285.  
  286.  
  287.      The VorComp program is called with two parameters in one of
  288. three ways:
  289.  
  290.    1. a file and a file
  291.    2. a file and a directory
  292.    3. a group and a group
  293.  
  294.  
  295.  
  296.                               - 5 -
  297.      In the first two cases, two individual files are compared.
  298. In the third case, the two complete groups of files are compared.
  299.  
  300.      A "group" is either a directory or else a file specification
  301. using "*" and/or "?" wildcards,
  302.  
  303.      Note that, for example, F* specifies all filenames starting
  304. with the letter F and with no extension. If it is desired to
  305. specify all filenames starting with the letter F and with any
  306. extension, use F*.* instead. This is the same, more rigorous
  307. convention that DOS uses for the COPY and XCOPY commands, but
  308. unlike the DIR command.
  309.  
  310.  
  311.      The DOS prompt is included in the examples below. In most of
  312. the cases shown, it is C> to indicate the C drive, but observe
  313. carefully the last three examples, where the default directory is
  314. also included in the prompt.
  315.  
  316.  
  317. Examples of type 1, a file and a file:
  318.  
  319.    C>  VORCOMP FILE1.EXT FILE2.EXT
  320.  
  321.    C>  VORCOMP FILE1.EXT A:\PROJECT\FILE2.EXT
  322.  
  323.  
  324. Examples of type 2, a file and a directory:
  325.  
  326.    C>  VORCOMP FILE.EXT A:
  327.  
  328.    C>  VORCOMP FILE.EXT A:\PROJECT
  329.  
  330.    C>  VORCOMP A:\PROJECT\FILE.EXT .
  331.  
  332.  
  333. Examples of type 3, a group and a group:
  334.  
  335.    C>  VORCOMP A: B:
  336.  
  337.    C>  VORCOMP A:MONTH??.TXT B:*.TXT
  338.  
  339.    C>  VORCOMP A:MONTH??.TXT B:\PAYROLL\*.TXT
  340.  
  341.    C:\>  VORCOMP \BUILD\PROJECT \BUILD\TEMP
  342.  
  343.    C:\BUILD>  VORCOMP PROJECT TEMP
  344.  
  345.    C:\BUILD\PROJECT>  VORCOMP . ..\TEMP
  346.  
  347.      In these examples, note that DOS will use a  .  as a path
  348. description of the default directory, and will use  ..  as a path
  349. description of the parent directory one level closer to the root
  350. directory.
  351.  
  352.  
  353.  
  354.  
  355.                               - 6 -
  356.      In the last three examples, the comparison is performed
  357. on the files in the same two subdirectories, C:\BUILD\PROJECT
  358. and C:\BUILD\TEMP . The difference in the way the commands are
  359. expressed arises in part from the differences in the default
  360. directory when the command is given.
  361.  
  362.  
  363.  
  364.  
  365. DISPLAY FORMAT
  366.  
  367.  
  368.      It is difficult in a pure ASCII file like this one to
  369. properly illustrate the VorComp display formats. This section
  370. will be covered in more detail in the printed documentation
  371. booklet given to registered users.
  372.  
  373.      The display format depends upon the type of comparison which
  374. is being performed and upon the options which are used with the
  375. command. The program display is intended to be self-explanatory,
  376. and can be easily learned by simply running the program with
  377. different options.
  378.  
  379.      When two individual files are compared, the display shows
  380. the details of any size differences, date and time differences,
  381. and attribute differences. Dates are shown as month-day-year.
  382. Times are shown as hour:minute:second , where 24 hour time is
  383. used, from 0 to 23 hours.
  384.  
  385.      When two individual files have different data, the first
  386. difference is shown with the offset address from the beginning
  387. of the file, and the data byte from each file. These numbers are
  388. displayed in hexadecimal notation. If the data difference occurs
  389. solely because one of the files is larger than the other, the
  390. missing data byte of the smaller file is shown as "--".
  391.  
  392.      In general, when two groups of files are compared, the
  393. display is in three columns. The first column shows files which
  394. are unique to the first group; the second column shows files
  395. which are unique to the second group; and the third column shows
  396. files which are common to both groups. In a fourth area of the
  397. screen, any differences which are detected in the common files
  398. are displayed.
  399.  
  400.      File differences which are detected include: file size
  401. differences, file data differences, creation date and time
  402. differences, and attribute differences.
  403.  
  404.      Attributes include the following: system file, hidden file,
  405. read-only file, and archive needed. Hidden files and system files
  406. may be compared when specified by directly by name for individual
  407. file comparison, or may be included in group searches when the /H
  408. option is used.
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                               - 7 -
  415.      When the /M option is used, more things are included in the
  416. comparisons. That is to say, directories and volume labels are
  417. included for display, creation data and time differences, and
  418. attribute differences. Directories are indicated in the display
  419. by being enclosed in corner brackets < > , and volume labels are
  420. indicated by being enclosed in square brackets [ ] .
  421.  
  422.      When comparing two groups of files on different disk drives,
  423. the output display in some places refers to the groups by using
  424. the letter of each drive. When comparing two groups of files on
  425. the same disk drive, the output display refers to the first group
  426. as "X" and refers to the second group as "Y" regardless of which
  427. drive the files are actually on.
  428.  
  429.      When comparing two groups of files on different disk drives,
  430. using the /S subdirectory option, the output display in some
  431. places refers to the directories by using the letter of each
  432. drive. When comparing two groups of files on the same disk drive,
  433. using the /S subdirectory option, the output display refers to
  434. the first directory group as "U" and refers to the second
  435. directory group as "V" regardless of which drive the files are
  436. actually on.
  437.  
  438.      The bottom of the display shows the totals of the columns.
  439. In order to avoid screen clutter, to make it easier to spot the
  440. significant numbers, zero counts are not displayed. If there are
  441. no differences in the common files whatever, the total difference
  442. counts are replaced with a long line of hyphens where the numbers
  443. would have otherwise been displayed. This line is easy to spot
  444. visually, and provides a quick confirmation that there are no
  445. detected differences.
  446.  
  447.      If there are no differences in the two groups whatsoever,
  448. including the files being in the same order, the display
  449. indicates "PERFECT EQUALITY" beneath the above mentioned line. If
  450. there are no differences in the two groups, except for the order
  451. of the files, the display instead indicates "Different order."
  452.  
  453.      Note that the above mentioned "PERFECT EQUALITY" refers to
  454. equality within the limits of the specified groups. If it is
  455. desired to compare two directories rigorously for differences, it
  456. is suggested that the /M and /H options be used to guarantee that
  457. subdirectories and hidden files are also considered. See the
  458. "General Options" section below.
  459.  
  460.      When subdirectory searches are specified using the /S
  461. option, the above display is performed for each common directory
  462. in the subdirectory tree, and then the grand totals for all of
  463. the subdirectories is displayed.
  464.  
  465.      A "PERFECT EQUALITY" for the grand total of a subdirectory
  466. search using the /S option requires "PERFECT EQUALITY" for each
  467. of the subdirectories in the search, as well as the existence
  468. of no unique subdirectories in either the first or the second
  469. group.
  470.  
  471.  
  472.  
  473.                               - 8 -
  474. USE OF OPTIONS
  475.  
  476.  
  477.      With no options specified, the program checks all specified
  478. files for differences in data, time, and attributes. Various
  479. options may be used to modify the selection of files included in
  480. the comparisons and to modify the display format.
  481.  
  482.      A variety of options are available for use with this
  483. program. These options may be in upper case or lower case. They
  484. may be used anywhere on the command line, either before, between,
  485. or after the file and directory names.
  486.  
  487.      The order of the options is not important, but in case of
  488. any conflict the rightmost option overrides earlier ones.
  489.  
  490.      Options usually consist of a forward slash and a letter.
  491.  
  492.      An exception to the above rule is the ErrorLevel option,
  493. which consists of "/E=" followed by some series of letters to
  494. indicate the types of error checking desired. See the "Error
  495. Codes" section below for more information.
  496.  
  497.       Two or more options may be combined into a series by using
  498. one slash and followed by all of the desired options. More than
  499. one series of options is allowed. If the "E=" option is included
  500. in a series, it must be used last in that series.
  501.  
  502.  
  503. Examples of the various styles for using options:
  504.  
  505.    VORCOMP /P /Q /H /M A: B:
  506.  
  507.    VORCOMP /P/Q/H/M A: B:
  508.  
  509.    VORCOMP /PQHM A: B:
  510.  
  511.    VORCOMP A: B: /PQHM
  512.  
  513.    VORCOMP A: B: /PQHM /E=XYDT!
  514.  
  515.    VORCOMP A: B: /PQHME=XYDT!
  516.  
  517.    VORCOMP A: B: /SE=XYC'UV?/P
  518.  
  519. See the "General-Purpose Options" and "Display Options" and
  520. "Error Codes" sections below for more details.
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                               - 9 -
  533. GENERAL-PURPOSE OPTIONS
  534.  
  535.  
  536. The general-purpose options are the following:
  537.  
  538.    /Q    Quick -- Causes the file data comparisons to consider
  539.          the file sizes only, in addition to the time and
  540.          attribute comparisons. The actual data within the files
  541.          is not compared.
  542.  
  543.          When this option is used, it is possible for two files
  544.          to be different, even though they may have the same
  545.          size, date, and attributes. The output display will
  546.          indicate the ambiguity in the number of different files
  547.          by using a "?" for the total or by adding a "+ ?" to the
  548.          total.
  549.  
  550.    /H    Hidden -- Causes hidden and system files to be included
  551.          in the comparisons of two groups. When the /M or /S
  552.          option is also used, this causes hidden and system
  553.          subdirectories to be included in those functions.
  554.  
  555.          This option is not necessary in order to reference a
  556.          hidden file or directory when it is specified directly
  557.          by name. The option is only required when it is desired
  558.          to find hidden and system files and directories within
  559.          some directory or within some group specified with
  560.          wildcards.
  561.  
  562.    /M    More -- Causes the comparison of two groups to include
  563.          subdirectories and volume labels in the output display
  564.          and totals. Of course there is no data comparison
  565.          performed here, but the time and attributes are
  566.          compared.
  567.  
  568.          Directories are indicated in the display by being
  569.          enclosed in corner brackets < > , and volume labels are
  570.          indicated by being enclosed in square brackets [ ] .
  571.  
  572.    /S    Subdirectory Tree -- Causes the comparisons of two
  573.          groups to also include comparisons within subdirectories
  574.          with common names.
  575.  
  576.          When this option is used, an output display is made
  577.          for each directory or subdirectory compared. This is
  578.          then followed by a grand total of all the compared
  579.          directories.
  580.  
  581.          If a group is specified with wildcards, this option
  582.          will cause the same wildcards to be applied to all
  583.          of the subdirectories in the tree.
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                              - 10 -
  592. DISPLAY OPTIONS
  593.  
  594.  
  595.    /T    Totals Only - Suppresses intermediate display
  596.          information and displays only the totals.
  597.  
  598.          When the /S option is also used, this displays only
  599.          the grand totals, and the totals if each individual
  600.          directory in the tree is suppressed.
  601.  
  602.          This option may be useful even if the display output is
  603.          redirected to the NUL device with the > feature of DOS,
  604.          because its use will result in greater speed.
  605.  
  606.  
  607.      The following four interrelated options control the output
  608. display when two groups are being compared:
  609.  
  610.    /X    First Group -- This limits the display to files which
  611.          are unique to the first group, but the totals will
  612.          correctly include all files. However, if this option is
  613.          used without either /C or /D below, then no actual data
  614.          comparisons will be performed, just as if the /Q quick
  615.          option above had been used.
  616.  
  617.    /Y    Second Group -- This limits the display to files which
  618.          are unique to the first group, but the totals will
  619.          correctly include all files. However, if this option is
  620.          used without either /C or /D below, then no actual data
  621.          comparisons will be performed, just as if the /Q quick
  622.          option above had been used.
  623.  
  624.    /C    Common Files -- This limits the display to files which
  625.          are common to both groups, but the totals will correctly
  626.          include all files.
  627.  
  628.    /D    Different -- This limits the display to files which are
  629.          common to both groups and which have been identified as
  630.          different, but the totals will correctly include all
  631.          files.
  632.  
  633.          Significant differences here include data differences,
  634.          date and time differences, and attribute differences.
  635.  
  636.  
  637.      These four options are listed here together because they are
  638. interrelated. They may be used together in combinations. Other
  639. than the /C and /D conflict discussed below, the options are
  640. additive, in that the display output will reflect the composite
  641. of the options selected.
  642.  
  643.      The default combination is /XYC . The use of any of the
  644. options in this set cancels the default combination completely,
  645. and the display is strictly under the control of the options
  646. which are specified.
  647.  
  648.  
  649.  
  650.                              - 11 -
  651.      For example, the combination /XY may be used to display
  652. filenames which are unique to either the first group or to the
  653. second group, but common filenames will not be displayed, and no
  654. data comparisons will be performed.
  655.  
  656.      For example, the combination /XYD will cause the output
  657. display to include all files unique to either group and also all
  658. common files which are different. Common files which are the same
  659. will not be individually displayed, but will be included in the
  660. totals.
  661.  
  662.      For example, the combination /QD will cause the output
  663. display to include only files which are common to the two groups,
  664. and which have a different size, date and time, or attributes,
  665. but no actual data comparisons would be performed.
  666.  
  667.      It should be noted that /C and /D conflict with each other.
  668. If they are both used, the later (rightmost) option will dominate
  669. and cancel the earlier option.
  670.  
  671.  
  672.  
  673.  
  674. PAUSE OPTIONS
  675.  
  676.  
  677. The display pause options are the following:
  678.  
  679.    /P    Pause -- Causes the output display to pause when the
  680.          screen is full, and at other appropriate times. After
  681.          any key press, the next screen of information will be
  682.          displayed.
  683.  
  684.          The display will be paused often enough so that summary
  685.          displays are not split into pieces. This may result in
  686.          more frequent pauses that absolutely necessary, but
  687.          gives a more readable display at each pause.
  688.  
  689.    /P=   Pause -- The same as above, plus the ability to specify
  690.          a custom screen size and/or prompt size.
  691.  
  692.          The default screen size is 25 lines. If a different size
  693.          screen is used, it may be specified here with the number
  694.          lines. For example: /P=43 .
  695.  
  696.          VorComp looks at the environment variable PROMPT to
  697.          determine how many lines long the prompt is by counting
  698.          the number of $_ in this string. This may affect the
  699.          pause operation on the last display screen. If the
  700.          user's computer has an unusual prompt, such as one
  701.          containing ANSI commands, and this count is incorrect,
  702.          the correct number lines in the prompt may be specified
  703.          here. For example: /P=,2 .
  704.  
  705.          Both the screen size and the prompt size may be
  706.          specified here together. For example: /P=43,2 .
  707.  
  708.  
  709.                              - 12 -
  710.    /P#   Pause -- The same as the above, except that the "Press
  711.          any key to continue" message is backspaced out of the
  712.          display, instead of being left on the screen.
  713.  
  714.    /P#=  Pause -- The same as /P# and /P= together. Follow this
  715.          with the screen and/or prompt size numbers as above.
  716.  
  717.  
  718.  
  719.  
  720. ERROR CODES
  721.  
  722.  
  723.    /E=   Error Codes -- This option is used to control the
  724.          detection and reporting of differences which will be
  725.          considered to be "errors." The option is followed by
  726.          any number of specific error codes.
  727.  
  728.  
  729.      The following is a list of the error codes which generate
  730. error messages if the specified condition is satisfied.
  731.  
  732.    /E=N     Never -- This may be used as a dummy place holder.
  733.  
  734.    /E=X     Unique First Group File -- Error if there is a file
  735.             which is unique to the first group.
  736.  
  737.    /E=Y     Unique Second Group File -- Error if there is a file
  738.             which is unique to the second group.
  739.  
  740.    /E=C     Common File -- Error if there is a common file.
  741.  
  742.    /E=D     Data Difference -- Error if there is a common file
  743.             which has different size or data.
  744.  
  745.    /E=T     Time Difference -- Error if there is a common file
  746.             which has different date or time.
  747.  
  748.    /E=A     Attribute Difference -- Error if there is a common
  749.             file which has different attributes.
  750.  
  751.    /E=O     Order Difference -- Error if there are any common
  752.             files which appear in a different directory position
  753.             in the in the two groups.
  754.  
  755.    /E=U     Unique First Group Subdirectory - Error if during a
  756.             /S tree search there is a subdirectory which is
  757.             unique to the first group.
  758.  
  759.    /E=V     Unique Second Group Subdirectory - Error if during a
  760.             /S tree search there is a subdirectory which is
  761.             unique to the second group.
  762.  
  763.    /E=W     Common Subdirectory - Error if during a /S tree
  764.             search there is a common subdirectory.
  765.  
  766.  
  767.  
  768.                              - 13 -
  769.      Of the above error codes, the four codes O U V W will never
  770. be true when two individual files are being compared. They can
  771. generate an error only when two groups of files are being
  772. compared.
  773.  
  774.  
  775.      The following is a special error code which will may be
  776. used immediately after any one of the above error codes. For
  777. example, /E=C' generates an error if there are NO common files.
  778.  
  779.       '     This reverses the logic of the previous code.
  780.  
  781.  
  782.      The following is a list of the error codes which may be used
  783. as an optional termination code to control the way errors are
  784. reported.
  785.  
  786.    /E=.     Report Errors, Redirectable, Silent --
  787.             If used, must be used last. The error message, if
  788.             any, is standard output.
  789.  
  790.    /E=!     Report Errors, On Screen, Bell --
  791.             If used, must be used last. The error message, if
  792.             any, is DOS error output, which will always display
  793.             on the screen even if the standard output is
  794.             redirected elsewhere by the > or >> feature of DOS.
  795.  
  796.    /E=?     Report Errors, On Screen, Bell, Press Any Key to
  797.                Continue --
  798.             If used, must be used last. The error message and
  799.             query, if any, is DOS error output, which will always
  800.             display on the screen even if the standard output is
  801.             redirected elsewhere by the > or >> feature of DOS.
  802.  
  803.  
  804.      When more than one of the above error codes is used, they
  805. must be combined in one /E= option statement. For example, if two
  806. directories are being compared, and it is desired to identify any
  807. difference in the contents as an error, the following series
  808. might be used:
  809.  
  810.    /E=XYDTA
  811.  
  812.  
  813.      If the /E= option is combined with other options, the E=
  814. option must be the last in the series. For example:
  815.  
  816.    VORCOMP A: B: /HSE=DT!
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.                              - 14 -
  828. ERROR REPORTING
  829.  
  830.  
  831.      Errors are reported in three different ways:
  832.  
  833.  
  834. 1. Using /E=. or /E=!
  835.  
  836.      If the error code series is terminated with a period or an
  837. exclamation mark, and the specified condition occurs, the program
  838. will give a final display output like the following:
  839.  
  840.  ********** ERROR ********** DT
  841.  
  842.      Here the letters after the string of asterisks indicate all
  843. of the error codes which generated errors. In the above example
  844. there was a data comparison error and a time comparison error.
  845.  
  846.  
  847. 2. Using /E=?
  848.  
  849.      If the error code series is terminated with a question mark,
  850. the program will also give a final display output like the above.
  851. In addition, the user will be prompted to press a key before the
  852. program will exit. For example:
  853.  
  854.  ********** ERROR ********** DT
  855.  
  856.  Press any key to continue.
  857.  
  858.      This is most useful when VorComp is used within a batch
  859. file, and it is important that the error message not be allowed
  860. to scroll off the screen without the user being aware of a
  861. detected problem. The user may then decide to use a Ctrl-C or a
  862. Ctrl-Break key to stop the continuation of the batch file.
  863.  
  864.  
  865. 3. Using ERRORLEVEL
  866.  
  867.      When the program exits after the comparison, the ErrorLevel
  868. is set to represent the degree of error. No errors results in an
  869. ErrorLevel of 0. An error generated by the first error code,
  870. results in an ErrorLevel of 1. An error generated by the second
  871. error code results in an ErrorLevel of 2, and so forth.
  872.  
  873.      If more than one error code generates an error, the
  874. ErrorLevel is set to the largest position number of the error
  875. codes which generate an error.
  876.  
  877.      This ErrorLevel is detectable from the DOS prompt or within
  878. a batch file with commands like the following:
  879.  
  880.    IF ERRORLEVEL 5 ECHO At least level five.
  881.  
  882.  
  883.  
  884.  
  885.  
  886.                              - 15 -
  887.      From within a batch file, the GOTO with a label is useful.
  888. For example:
  889.  
  890.    IF ERRORLEVEL 5 GOTO ERROR5
  891.  
  892.      ...
  893.  
  894.    :ERROR5
  895.    ECHO At least level five.
  896.  
  897.      Because the IF ERRORLEVEL command responds to an ErrorLevel
  898. of the specified level or greater, if one wants to detect
  899. different values for the ErrorLevel, one should check for the
  900. higher value first, followed in turn by checks for lower values.
  901. Therefore, it may be desirable to order the error codes after the
  902. /E= option so that the least severe error codes are given first,
  903. followed in turn by the more severe conditions.
  904.  
  905.      For example, if the batch file must make a distinction
  906. between time comparison errors and data comparison errors, and if
  907. a data error is to be considered more severe than a time error,
  908. then the correct order would be /E=TD .
  909.  
  910.    ECHO OFF
  911.    VORCOMP A: B: /E=TD
  912.    IF ERRORLEVEL 2 GOTO DATAERR
  913.    IF ERRORLEVEL 1 GOTO TIMEERR
  914.    GOTO END
  915.    :DATAERR
  916.    ECHO The data is bad.
  917.    GOTO END
  918.    :TIMEERR
  919.    ECHO The data is good, but the time is wrong.
  920.    :END
  921.  
  922.  
  923.      Any serious errors, such as insufficient memory, too many
  924. files, overly long pathnames, directory not found, or any other
  925. errors which prevent the program from performing its job, will
  926. result in an ErrorLevel of 100, higher than any to be expected to
  927. be specified by the /E= option. Any error messages resulting from
  928. such problems will be DOS error output, so that such messages
  929. will be written to the screen and will not be redirected
  930. elsewhere if the > or >> features of DOS are used. The last line
  931. of such error output will be the following:
  932.  
  933.  ********** SYSTEM ERROR **********
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.                              - 16 -
  946. BATCH FILE SUGGESTIONS
  947.  
  948.  
  949.  
  950. <<< To copy all files to a floppy disk. >>>
  951.  
  952.      The following is a suggestion for a batch file which will
  953. copy all the files in the default directory to a floppy disk,
  954. test the floppy disk, and report the error if the operation is
  955. not performed correctly. An error could occur if the floppy disk
  956. contained read-only files which would not erase, if it filled up,
  957. or if by some fluke the data was written incorrectly.
  958.  
  959.             SAVEALL.BAT
  960.    ------------------------------
  961.    ECHO OFF
  962.    ECHO YES | DEL A:*.*
  963.    COPY *.* A:
  964.    VORCOMP A: . /E=XYDT!
  965.  
  966.       The second line in the above batch file uses the DOS pipe
  967. feature to erase all of the files on the floppy disk and to
  968. automatically answer the usual question about being sure.
  969.  
  970.  
  971.  
  972. <<< To copy selected files to a floppy disk. >>>
  973.  
  974.      The following is an example of a batch file which will copy
  975. selected files to a floppy disk, test the floppy disk, and report
  976. the error if the operations are not performed correctly.
  977.  
  978.              SAVE.BAT
  979.    ------------------------------
  980.    ECHO OFF
  981.    ECHO YES | DEL A:*.*
  982.    COPY *.ASM A:
  983.    COPY *.BAT A:
  984.    COPY *.DOC A:
  985.    ECHO Testing the backup.
  986.    VORCOMP A: *.ASM /QTE=Y? > NUL
  987.    VORCOMP A: *.BAT /QTE=Y? > NUL
  988.    VORCOMP A: *.DOC /QTE=Y? > NUL
  989.    VORCOMP A: *.*   /TE=XDT? > NUL
  990.  
  991.      The last four lines in the above batch file use the >
  992. redirection to the NUL device to eliminate the display on the
  993. screen. The first three of these verifies that all of the desired
  994. files were copied, and the forth verifies the actual data.
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.                              - 17 -
  1005. <<< A general-purpose copy command with error checking. >>>
  1006.  
  1007.      The following is a suggestion for a batch file which will
  1008. copy a group of files from one directory to another, or will copy
  1009. an individual file to another file in a different directory or to
  1010. a file with a different name. It uses XCOPY and then compares the
  1011. result to verify that the copy was performed correctly.
  1012.  
  1013.              CCOPY.BAT
  1014.    ------------------------------
  1015.    ECHO OFF
  1016.    IF "%2" == "" GOTO ERROR
  1017.    XCOPY %1 %2
  1018.    IF ERRORLEVEL 1 GOTO ERROR
  1019.    VORCOMP %1 %2 /E=XDT
  1020.    IF ERRORLEVEL 1 GOTO ERROR
  1021.    GOTO END
  1022.    :ERROR
  1023.    ECHO *
  1024.    ECHO ********** ERROR **********
  1025.    :END
  1026.  
  1027.      This will verify that the "Compare COPY" command CCOPY has
  1028. two parameters after it, which helps avoid accidents which can
  1029. be caused if one presses the Enter key to soon. Of course if the
  1030. user actually wishes to copy into the default directory, this may
  1031. be identified by using the  .  to represent the current
  1032. directory.
  1033.  
  1034.      The third line from the bottom of the above batch file
  1035. appears to contain an asterisk, but what is really wanted here is
  1036. an ASCII 255 character from the extended character set, which
  1037. gives the same appearance as a space. This is a technique used to
  1038. make the ECHO command produce a blank line. In EDLIN and in other
  1039. editors such our editor, VOREDIT (tm) from Voree Software, this
  1040. character can be entered into a file by typing 255 on the numeric
  1041. key pad while the Alt key is being held down.
  1042.  
  1043.  
  1044.  
  1045. <<< To perform a tested archive of files. >>>
  1046.  
  1047.      The following is a suggestion for a batch file which may be
  1048. used with the archive program PKZIP (tm) and PKUNZIP (tm) from
  1049. PKWARE. This batch file program performs the following steps:
  1050.  
  1051.   1. Makes sure that the .ZIP file does not already exist.
  1052.   2. Archives a group of files into a new .ZIP file.
  1053.   3. Unzips the new archive to a temporary directory.
  1054.   4. Compares the unzipped files to the original files.
  1055.  
  1056. The batch file is used with a command like the following:
  1057.  
  1058.    ZIP A:NEWFILE *.EXE
  1059.  
  1060. which then creates NEWFILE.ZIP on the A: disk containing all of
  1061. the .EXE files, and tests the archive.
  1062.  
  1063.                              - 18 -
  1064.      The purpose of the above sequence is to verify that the
  1065. PKZIP creates an archive file which may be faithfully recovered.
  1066. It is not intended here to imply that PKZIP or any other specific
  1067. data compression program is in any way unreliable. However, if
  1068. one has extremely valuable data files, and it is important to be
  1069. absolutely certain that the compression and decompression will
  1070. not affect the contents of the files, then prudence may be
  1071. appropriate. A convenient form of insurance is the use of this
  1072. batch file, or a similar one, using VORCOMP to compare the
  1073. original files with the compressed and decompressed ones.
  1074.  
  1075.  
  1076.              ZIP.BAT
  1077.    ------------------------------
  1078.    ECHO OFF
  1079.    IF "%2" == "" GOTO ERROR
  1080.    IF NOT EXIST C:\BAT\TEMP\*.* GOTO ZIP1
  1081.    ECHO YES | DEL C:\BAT\TEMP\*.* > NUL
  1082.    :ZIP1
  1083.    IF EXIST %1.ZIP GOTO ERROR
  1084.    PKZIP -o %1 %2
  1085.    PKUNZIP %1 C:\BAT\TEMP
  1086.    VORCOMP %2 C:\BAT\TEMP /E=XYC'DT
  1087.    IF ERRORLEVEL 1 GOTO ERROR
  1088.    IF NOT EXIST C:\BAT\TEMP\*.* GOTO END
  1089.    ECHO YES | DEL C:\BAT\TEMP\*.* > NUL
  1090.    GOTO END
  1091.    :ERROR
  1092.    ECHO *
  1093.    ECHO ********** ERROR **********
  1094.    :END
  1095.  
  1096.  
  1097.      As in the previous example, the * in the third line from
  1098. the bottom should be replaced by the ASCII 255 pseudo-space
  1099. character.
  1100.  
  1101.      This batch file makes use of a temporary directory to
  1102. perform some of the work, which in the above batch file is
  1103. called C:\BAT\TEMP , but could be some other directory on the
  1104. user's hard disk which does not contain any permanent files.
  1105.  
  1106.      If it is desired to also test the order of the files in the
  1107. archive, an O could be included among the error codes.
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.                              - 19 -